<div class="bg-light lter b-b wrapper-md">
    <h1 class="m-n font-thin h3">编辑房源信息</h1>
</div>
<div class="wrapper-md" ng-controller="editHouseCtrl">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" method="get" action="#" onkeydown="if(event.keyCode==13)return false;">
                <div class="panel panel-default">
                    <div class="panel-heading font-bold">
                        基础信息
                    </div>
                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">所在城市<span style="color: red">*</span></label>
                            <ui-pcd child-class="col-sm-2" provinceid="{{provinceId}}" cityid="{{cityId}}" areaid="{{countyId}}" ></ui-pcd>
                            <div class="col-sm-2">
                                <input type="text" ng-model="params.areaName" class="form-control" placeholder="小区名称">
                            </div>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" ng-model="params.address" placeholder="房源具体地址">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">房间号<span style="color: red">*</span></label>
                            <div class="col-sm-2">
                                <input type="text" ng-model="params.roomCode" class="form-control" placeholder="房间号">
                            </div>
                        </div>

                        <!-- <div class="form-group">
                            <label class="col-sm-2 control-label">房间名称</label>
                            <div class="col-sm-2">
                                <input type="text" ng-model="params.houseName" class="form-control" placeholder="房间名称">
                                <span class="text-danger font-bold">*</span>
                            </div>
                        </div> -->
                        <div class="line line-dashed b-b line-lg pull-in"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">户型<span style="color: red">*</span></label>
                            <div class="col-sm-2">
                                <ui-select ng-model="houseType.selected" theme="bootstrap">
                                    <ui-select-match placeholder="请选择户型...">{{$select.selected.name}}</ui-select-match>
                                    <ui-select-choices repeat="item in houseTypeList | filter: $select.search">
                                        <div ng-bind-html="item.name | highlight: $select.search"></div>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                            <div class="col-sm-2">
                                <ui-select ng-model="orientation.selected" theme="bootstrap">
                                    <ui-select-match placeholder="请选择朝向...">{{$select.selected.name}}</ui-select-match>
                                    <ui-select-choices repeat="item in orientationList | filter: $select.search">
                                        <div ng-bind-html="item.name | highlight: $select.search"></div>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                            <div class="col-sm-2">
                                <div class="input-group m-b">
                                    <input type="number" ng-model="params.houseSize" class="form-control">
                                    <span class="input-group-addon">㎡</span>
                                </div>
                            </div>
                        </div>
                        <!-- <div class="line line-dashed b-b line-lg pull-in"></div>
                        <div class="form-group">

                            <label class="col-sm-2 control-label"></label>
                            <div class="col-sm-2">
                                <div class="input-group m-b">
                                    <span class="input-group-addon">卧室数量</span>
                                    <input type="number" ng-model="params.bedRoom" class="form-control">
                                </div>
                            </div>
                            <div class="col-sm-2">
                                <div class="input-group m-b">
                                    <span class="input-group-addon">客厅数量</span>
                                    <input type="number" ng-model="params.liveRoom" class="form-control">
                                </div>
                            </div>
                            <div class="col-sm-2">
                                <div class="input-group m-b">
                                    <span class="input-group-addon">厨房数量</span>
                                    <input type="number" ng-model="params.kitchenRoom" class="form-control">
                                </div>
                            </div>
                            <div class="col-sm-2">
                                <div class="input-group m-b">
                                    <span class="input-group-addon">卫生间数量</span>
                                    <input type="number" ng-model="params.toiletRoom" class="form-control">
                                </div>
                            </div>
                        </div> -->
                        <div class="line line-dashed b-b line-lg pull-in"></div>
                        <div class="form-group">

                            <label class="col-sm-2 control-label">装修情况<span style="color: red">*</span></label>
                            <div class="col-sm-2">
                                <ui-select ng-model="renovation.selected" theme="bootstrap">
                                    <ui-select-match placeholder="请选择朝向...">{{$select.selected.name}}</ui-select-match>
                                    <ui-select-choices repeat="item in renovationList | filter: $select.search">
                                        <div ng-bind-html="item.name | highlight: $select.search"></div>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                        </div>
                        <div class="line line-dashed b-b line-lg pull-in"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">层高<span style="color: red">*</span></label>
                            <div class="col-sm-2">
                                <input type="number" class="form-control" placeholder="所在楼层" ng-model="params.currFloor">
                            </div>
                            <div class="col-sm-2">
                                <input type="number" class="form-control" placeholder="总楼层数" ng-model="params.floors">
                            </div>
                        </div>
                        <!-- <div class="form-group">
                            <label class="col-sm-2 control-label">房东手机号<span style="color: red">*</span></label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" placeholder="房东手机号" ng-model="params.landlordMobile">
                            </div>
                        </div> -->
                    </div>
                    <div class="panel-heading font-bold">
                        出租信息
                    </div>
                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">出租类型<span style="color: red">*</span></label>
                            <div class="col-sm-2">
                                <ui-select ng-model="leaseType.selected" theme="bootstrap">
                                    <ui-select-match placeholder="请选择出租类型...">{{$select.selected.name}}</ui-select-match>
                                    <ui-select-choices repeat="item in leaseTypeList | filter: $select.search">
                                        <div ng-bind-html="item.name | highlight: $select.search"></div>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                            <label class="col-sm-1 control-label">出租状态<span style="color: red">*</span></label>
                            <div  class="col-sm-2">
                                <ui-select ng-model="isRent.selected" theme="bootstrap">
                                    <ui-select-match placeholder="请选择是否出租...">{{$select.selected.name}}</ui-select-match>
                                    <ui-select-choices repeat="item in isRentList | filter: $select.search">
                                        <div ng-bind-html="item.name | highlight: $select.search"></div>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                            <!-- <label class="col-sm-1 control-label">是否可以随时入住<span style="color: red">*</span></label>
                            <div  class="col-sm-2">
                                <ui-select ng-model="isAnyTime.selected" theme="bootstrap">
                                    <ui-select-match placeholder="请选择是否随时可以入住...">{{$select.selected.name}}</ui-select-match>
                                    <ui-select-choices repeat="item in isAnyTimeList | filter: $select.search">
                                        <div ng-bind-html="item.name | highlight: $select.search"></div>
                                    </ui-select-choices>
                                </ui-select>
                            </div> -->
                        </div>
                        <div class="line line-dashed b-b line-lg pull-in"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">月租金 <span style="color: red">*</span></label>
                            <div class="col-sm-2">
                                <div class="input-group m-b">
                                    <input type="number" ng-model="params.houseRent" class="form-control">
                                    <span class="input-group-addon">元</span>
                                </div>
                            </div>
                            <label class="col-sm-1 control-label">支付方式<span style="color: red">*</span></label>
                            <div class="col-sm-2">
                                <ui-select ng-model="payType.selected" theme="bootstrap">
                                    <ui-select-match placeholder="请选择支付方式...">{{$select.selected.name}}</ui-select-match>
                                    <ui-select-choices repeat="item in payTypeList | filter: $select.search">
                                        <div ng-bind-html="item.name | highlight: $select.search"></div>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                            <label class="col-sm-1 control-label">押金<span style="color: red">*</span></label>
                            <div class="col-sm-2">
                                <ui-select ng-model="deposit.selected" theme="bootstrap">
                                    <ui-select-match placeholder="请选择押金...">{{$select.selected.name}}</ui-select-match>
                                    <ui-select-choices repeat="item in depositList | filter: $select.search">
                                        <div ng-bind-html="item.name | highlight: $select.search"></div>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                        </div>
                    </div>
                    <div class="panel-heading font-bold">
                        房屋描述
                    </div>
                    <div class="panel-body">
                        
                       <!--  <div class="form-group">
                            <label class="col-sm-2 control-label" ng-click="selectHouseDevice()">房屋设施</label>
                            <div class="col-sm-8">
                                <ui-select multiple ng-model="houseDevice.selected" theme="bootstrap">
                                    <ui-select-match placeholder="请选择房屋设施...">{{$item.name}}</ui-select-match>
                                    <ui-select-choices repeat="item in houseDeviceList | filter: $select.search">
                                        <div ng-bind-html="item.name | highlight: $select.search"></div>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                        </div> -->
                        
                        <div class="form-group">
                            <label class="col-sm-2 control-label">房屋设施</label>
                        </div>
                        <div>
                            <button class="selectInvert" type="button" ng-click="chooseAll()">全选/反选</button>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-10 houseDeviceOption">
                                <div class="col-sm-2" >
                                    <label class="furniture" for="bed" ng-class={active:bed}>床</label>
                                    <input type="checkbox" id="bed" class="checkBoxSelected" ng-model="bed" ng-checked="params.bed" />
                                </div>
                                <div class="col-sm-2" >
                                   <label class="furniture" for="sofa" ng-class={active:sofa}>沙发</label>
                                   <input type="checkbox" id="sofa" class="checkBoxSelected" ng-model="sofa" ng-checked="params.sofa" />
                               </div>
                               <div class="col-sm-2" >
                                   <label class="furniture" for="board" ng-class={active:board}>餐桌</label>
                                   <input type="checkbox" id="board" class="checkBoxSelected" ng-model="board" ng-checked="params.board" />
                               </div>
                               <div class="col-sm-2" >
                                   <label class="furniture" for="desk" ng-class={active:desk}>书桌</label>
                                   <input type="checkbox" id="desk" class="checkBoxSelected" ng-model="desk" ng-checked="params.desk" />
                               </div>
                               <div class="col-sm-2" >
                                   <label class="furniture" for="chair" ng-class={active:chair}>椅子</label>
                                   <input type="checkbox" id="chair" class="checkBoxSelected" ng-model="chair" ng-checked="params.chair" />
                               </div>
                               <div class="col-sm-2" >
                                   <label class="furniture" for="washMachine" ng-class={active:washMachine}>洗衣机</label>
                                   <input type="checkbox" id="washMachine" class="checkBoxSelected" ng-model="washMachine" ng-checked="params.washMachine" />
                               </div>
                               <div class="col-sm-2" >
                                   <label class="furniture" for="refrigerator" ng-class={active:refrigerator}>冰箱</label>
                                   <input type="checkbox" id="refrigerator" class="checkBoxSelected" ng-model="refrigerator" ng-checked="params.refrigerator" />
                               </div>
                               <div class="col-sm-2" >
                                   <label class="furniture" for="television" ng-class={active:television}>电视</label>
                                   <input type="checkbox" id="television" class="checkBoxSelected" ng-model="television" ng-checked="params.television" />
                               </div>
                               <div class="col-sm-2" >
                                   <label class="furniture" for="airCondition" ng-class={active:airCondition}>空调</label>
                                   <input type="checkbox" id="airCondition" class="checkBoxSelected" ng-model="airCondition" ng-checked="params.airCondition" />
                               </div>
                               <div class="col-sm-2" >
                                   <label class="furniture" for="waterHeater" ng-class={active:waterHeater}>热水器</label>
                                   <input type="checkbox" id="waterHeater" class="checkBoxSelected" ng-model="waterHeater" ng-checked="params.waterHeater" />
                               </div>
                               <div class="col-sm-2" >
                                   <label class="furniture" for="lampblackMachine" ng-class={active:lampblackMachine}>油烟机</label>
                                   <input type="checkbox" id="lampblackMachine" class="checkBoxSelected" ng-model="lampblackMachine" ng-checked="params.lampblackMachine" />
                               </div>
                               <div class="col-sm-2" >
                                   <label class="furniture" for="ambry" ng-class={active:ambry}>橱柜</label>
                                   <input type="checkbox" id="ambry" class="checkBoxSelected" ng-model="ambry" ng-checked="params.ambry" />
                               </div>
                               <div class="col-sm-2" >
                                   <label class="furniture" for="wifi" ng-class={active:wifi}>无线网</label>
                                   <input type="checkbox" id="wifi" class="checkBoxSelected" ng-model="wifi" ng-checked="params.wifi" />
                               </div>
                               <div class="col-sm-2" >
                                   <label class="furniture" for="stove" ng-class={active:stove}>燃气灶</label>
                                   <input type="checkbox" id="stove" class="checkBoxSelected" ng-model="stove" ng-checked="params.stove" />
                               </div>
                               <div class="col-sm-2" >
                                   <label class="furniture" for="microwaveOven" ng-class={active:microwaveOven}>微波炉</label>
                                   <input type="checkbox" id="microwaveOven" class="checkBoxSelected" ng-model="microwaveOven" ng-checked="params.microwaveOven" />
                               </div>
                            </div>
                        </div>


                        <div class="line line-dashed b-b line-lg pull-in"></div>
                        <div class="form-group">
                            <label class="col-sm-2  control-label">房型图片：</label>
                            <div class="col-sm-2">
                                <ui-select ng-model="picModel.selected" theme="bootstrap">
                                    <ui-select-match>{{$select.selected.name}}</ui-select-match>
                                    <ui-select-choices repeat="item in picModelList | filter: $select.search">
                                        <div ng-bind-html="item.name | highlight: $select.search" ng-click="chooseModel($index,picModelList)"></div>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                            <button class="btn-yellow" type="button" ng-click="addModelPics()">添加房型图片</button>
                            <button class="btn-yellow" type="button" ng-click="editModelPics(templetId)" ng-if="editPicFlag">编辑房型图片</button>
                        </div>
                        <!-- <div class="form-group">
                            <label class="col-sm-2 control-label">卧室照片</label>
                            <div class="col-sm-8">
                                <tiny-image source="bedRoom" on-change="bedRoomChange"></tiny-image>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">客厅照片</label>
                            <div class="col-sm-8">
                                <tiny-image source="livingRoom" on-change="livingRoomChange"></tiny-image>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">卫生间照片</label>
                            <div class="col-sm-8">
                                <tiny-image source="bathRoom" on-change="bathRoomChange"></tiny-image>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">厨房照片</label>
                            <div class="col-sm-8">
                                <tiny-image source="kitchenRoom" on-change="kitchenRoomChange"></tiny-image>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">外部照片</label>
                            <div class="col-sm-8">
                                <tiny-image source="environment" on-change="environmentChange"></tiny-image>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">房门照片</label>
                            <div class="col-sm-8">
                                <tiny-image source="door" on-change="doorChange"></tiny-image>
                            </div>
                        </div> -->
                        <uploadimg></uploadimg>
                        <div class="form-group">
                            <label class="col-sm-2  control-label">房屋简介</label>
                            <textarea class="col-sm-6" style="min-height: 60px;" ng-model="params.description"></textarea>
                        </div>
                        <div class="form-group">
                             <label class="col-sm-2  control-label">宜居人数</label>
                            <textarea class="col-sm-6" style="min-height: 60px;" ng-model="params.habitable"></textarea>
                        </div>
                        <div class="form-group">
                             <label class="col-sm-2  control-label">房东寄语</label>
                            <textarea class="col-sm-6" style="min-height: 60px;" ng-model="params.remark"></textarea>
                        </div>
                        <div class="line line-dashed b-b line-lg pull-in"></div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <div ng-click="backList(type)" class="btn btn-default">返回</div>
                                <div ng-click="saveData(type)" class="btn btn-primary">保存</div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
